//
//  GJFMerchantDetailIntroduceTableViewCell.m
//  Wedding
//
//  Created by 郭静芬 on 2017/1/3.
//  Copyright © 2017年 郭静芬. All rights reserved.
//

#import "GJFMerchantDetailIntroduceTableViewCell.h"

@interface GJFMerchantDetailIntroduceTableViewCell ()
@end

@implementation GJFMerchantDetailIntroduceTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}

- (void)setMerchantModel:(GJFMerchantModel *)merchantModel {
    _merchantModel = merchantModel;
    self.introduceDetail.text = merchantModel.introduction;

}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    CGFloat h = [GJFSingleTool heightWithText:self.merchantModel.introduction fontSize:18 Width:WIDTH - 20 * XX];
    self.introduceDetail.frame = CGRectMake(15 * XX, 0, WIDTH - 30 * XX, h + 30 * YY);
}


- (UILabel *)introduceDetail {
    if (!_introduceDetail) {
        _introduceDetail = [[UILabel alloc] init];
        _introduceDetail.numberOfLines = 0;
        _introduceDetail.textColor = [UIColor darkGrayColor];
        _introduceDetail.font = [UIFont systemFontOfSize:18 * XX];
        [self.contentView addSubview:_introduceDetail];
    }
    return _introduceDetail;
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
